<?xml version="1.0"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
      <Title>Define a Csla Method</Title>
      <Author>Rockford Lhotka</Author>
      <Description>Define a Csla Method with Authorization.</Description>
      <HelpUrl>
      </HelpUrl>
      <Shortcut>cslamet</Shortcut>
    </Header>
    <Snippet>
      <Declarations>
        <Literal Editable="true">
          <ID>MethodName</ID>
          <ToolTip>Replace with methodname.</ToolTip>
          <Default>Name</Default>
          <Function>
          </Function>
        </Literal>
      </Declarations>
      <Code Language="csharp" Kind="method decl"><![CDATA[public static MethodInfo $MethodName$Method = RegisterMethod(c => c.$MethodName$());
public void $MethodName$()
{
  // Check Authorization, trows UserNotAuthorizedException if not authorized
  CanExecuteMethod($MethodName$Method, true);

  // implementation goes here 
  $end$
}]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>